package com.bwie.auth.service;

import com.bwie.auth.dao.AuthBookDao;
import com.bwie.common.domain.User;
import com.bwie.common.results.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AuthServiceImpl implements AuthService{
@Autowired
    AuthBookDao authBookDao;

    @Override
    public Result AuthBookUser(User user) {
        User user1= authBookDao.findUser(user);
        if(user.getUserId()< 0){
            return new Result(500,"账号不存在");
        }
        if(user.getPassword().equals(user)){
            return new Result(501,"密码不正确");
        }
        authBookDao.userAuthpassword(user);
        return new Result(200,"登录成功");
    }
}
